package com.changgou.goods.dao;

import com.changgou.goods.pojo.Template;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

public interface TemplateMapper extends Mapper<Template> {

    @Update("update tb_template set spec_num=spec_num+1 where id=#{id}")
    int updateSpecNum(@Param("id") Integer id);

    @Update("update tb_template set spec_num=spec_num-1 where id=#{id}")
    int updateSpecNum2(@Param("id") Integer id);

    @Update("update tb_template set para_num=para_num+1 where id=#{id}")
    int updateParaNum(@Param("id") Integer id);

    @Update("update tb_template set para_num=para_num-1 where id=#{id}")
    int updateParaNum2(@Param("id") Integer id);
}
